package org.adorsys.aderp.orga.repository;

import java.util.List;

import org.adorsys.aderp.orga.domain.EmailAddressRole;
import org.adorsys.aderp.orga.domain.OrgaPerson;
import org.adorsys.aderp.orga.domain.OrgaResource;
import org.adorsys.aderp.orga.domain.ResourceEmail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.roo.addon.layers.repository.jpa.RooJpaRepository;

@RooJpaRepository(domainType = ResourceEmail.class)
public interface ResourceEmailRepository {
	List<ResourceEmail> findByOrgaResource(OrgaResource orgaResource);
	Page<ResourceEmail> findByOrgaResource(OrgaResource orgaResource, Pageable pageable);
	Page<ResourceEmail> findByOrgaResourceAndAddressRole(OrgaResource orgaResource, EmailAddressRole addressRole, Pageable pageable);
	Page<ResourceEmail> findByAddressRole(EmailAddressRole addressRole, Pageable pageable);

}
